import { ISchema } from '@formily/react';
import {
  createInbizSchema,
  createEmptySchema,
  createDecoratorStyleSchema,
  createComponentStyleSchema,
} from '@inbiz/setters';
export const Space: ISchema = createInbizSchema({
  attribute: {
    ...createEmptySchema({
      align: {
        type: 'string',
        enum: ['start', 'end', 'center'],
        'x-decorator': 'FormItem',
        'x-component': 'Select',
        'x-component-props': {
          defaultValue: 'center',
        },
      },
      direction: {
        type: 'string',
        enum: ['vertical', 'horizontal'],
        'x-decorator': 'FormItem',
        'x-component': 'Radio.Group',
        'x-component-props': {
          defaultValue: 'horizontal',
          optionType: 'button',
        },
      },
      size: {
        type: 'number',
        'x-decorator': 'FormItem',
        'x-component': 'NumberPicker',
        'x-component-props': {
          defaultValue: 8,
        },
      },
      split: {
        type: 'string',
        'x-decorator': 'FormItem',
        'x-component': 'Input',
      },
      wrap: {
        type: 'boolean',
        'x-decorator': 'FormItem',
        'x-component': 'Switch',
      },
    }),
  },
  style: {
    ...createComponentStyleSchema({}),
    ...createDecoratorStyleSchema(),
  },
});
